{extend name="layout/goods" /}

{block name="content"}
{include file="common/search" /}
<!--主体-->
<div class='weui-content'>
    <!--顶部轮播-->
    <div class="swiper-container swiper-banner">
        <div class="swiper-wrapper">
            {volist name="banner" id="v"}
            <div class="swiper-slide"><a href="{$v.url}"><img src="{$v.img}" /></a></div>
            {/volist}
        </div>
        <div class="swiper-pagination"></div>
    </div>

    <!--新品-->
    <div class="wy-Module">
        <div class="wy-Module-tit-line"><span>健康推荐</span></div>
        <div class="wy-Module-con">
            <ul class="wy-pro-list clear">
                {volist name="goods" id="v"}
                <li>
                    <a href="{:url('goods/detail', ['id' => $v['id']])}">
                        <div class="proimg"><img src="{$v.cover}"></div>
                        <div class="protxt">
                            <div class="name">{$v.name}</div>
                            <div class="wy-pro-pri">¥<span>{$v.price}</span></div>
                        </div>
                    </a>
                </li>
                {/volist}
            </ul>
            <div class="morelinks"><a href="{:url('goods/index')}">查看更多 >></a></div>
        </div>
    </div>
</div>
{include file="common/footer" /}
{/block}

{block name="script"}
<script src="__CDN__/assets/lib/fastclick.js"></script>
<script type="text/javascript">
$(function() {
    FastClick.attach(document.body);
});
$(".swiper-banner").swiper({
    loop: true,
    autoplay: 3000
});
$(".swiper-news").swiper({
    loop: true,
    direction: 'vertical',
    paginationHide :true,
    autoplay: 30000
});
$(".swiper-jingxuan").swiper({
    pagination: '.swiper-pagination',
    loop: true,
    paginationType:'fraction',
    slidesPerView:3,
    paginationClickable: true,
    spaceBetween: 2
});
$(".swiper-jiushui").swiper({
    pagination: '.swiper-pagination',
    paginationType:'fraction',
    loop: true,
    slidesPerView:3,
    slidesPerColumn: 2,
    paginationClickable: true,
    spaceBetween:2
});
</script>
{/block}
